From: David Härdeman Date: Wed, 24 Sep 2025 13:42:02 +0000 (+0200) Subject: dhcpv4: move the remaining forward declaration X-Git-Url: http://git.openwrt.org/%22https:/collectd.org/%22http:/www.crowdsec.net//%22https%22/%22https:/collectd.org/%22http:/www.crowdsec.net/%22https%22?a=commitdiff_plain;h=354ed627425c85f9041e03880362e2043d57298c;p=project%2Fodhcpd.git dhcpv4: move the remaining forward declaration Down to where it is clearer why it is needed (there's a circular dependency between dhcpv4_fr_delay_timer() and dhcpv4_fr_rand_delay()). Signed-off-by: David Härdeman Link: https://github.com/openwrt/odhcpd/pull/264 Signed-off-by: Álvaro Fernández Rojas --- diff --git a/src/dhcpv4.c b/src/dhcpv4.c index a09c460..0416bae 100644 --- a/src/dhcpv4.c +++ b/src/dhcpv4.c @@ -40,8 +40,6 @@ DHCPV4_MIN_PACKET_SIZE : (uint8_t *)end - (uint8_t *)start) #define MAX_PREFIX_LEN 28 -static void dhcpv4_fr_rand_delay(struct dhcp_assignment *a); - static uint32_t serial = 0; struct odhcpd_ref_ip { @@ -270,6 +268,8 @@ static void dhcpv4_fr_start(struct dhcp_assignment *a) dhcpv4_fr_send(a); } +static void dhcpv4_fr_rand_delay(struct dhcp_assignment *a); + static void dhcpv4_fr_delay_timer(struct uloop_timeout *event) { struct dhcp_assignment *a = container_of(event, struct dhcp_assignment, fr_timer);